<?php
/* --------------------------------------------------------------
   smatch.php 2010-07-29 gm
   Gambio GmbH
   http://www.gambio.de
   Copyright (c) 2010 Gambio GmbH
   Released under the GNU General Public License
   --------------------------------------------------------------
*/
?><?php
class Smatch{
	var $v_partnerlink;
	var $v_export_type;
	var $v_module_name;
	var $v_module_homepage;
	var $v_module_format;
	var $v_module_export_filename;
	var $v_filename;
	var $v_keyname;
	var $v_linkname;
	var $v_delimiter;
	var $v_enclosure;
	var $v_field_filename;
	var $v_field_customers_groups;
	var $v_field_currency;
	var $v_field_shipping_costs;
	var $v_field_shipping_costs_free;
	var $v_field_attributes;
	var $v_field_campaign;
	var $v_field_export;

	function Smatch() {
		$this->formSettings();
	}

	function formSettings(){
		$this->v_partnerlink='www.gambio.de/Unsere-Partner/smatch.html';
		$this->v_export_type='comparison';
		$this->v_module_name='Smatch.com';
		$this->v_module_homepage='www.smatch.com';
		$this->v_module_format='csv';
		$this->v_module_export_filename='smatch.csv';
		$this->v_filename='smatch.php';
		$this->v_keyname='SMATCH';
		$this->v_linkname='smatch';
		$this->v_delimiter=';';
		$this->v_enclosure='"';

		$this->v_field_filename=true;
		$this->v_field_customers_groups=true;
		$this->v_field_currency=true;
		$this->v_field_shipping_costs=true;
		$this->v_field_shipping_costs_free=true;
		$this->v_field_attributes=true;
		$this->v_field_campaign=true;
		$this->v_field_export=true;
	}

	function formAddOn(){

	}

	function formatResults($p_products_array){
		$p_products_array['retail_price']=number_format( (double)$p_products_array['retail_price'], 2, ',', '');
		$p_products_array['products_price']=number_format( (double)$p_products_array['products_price'], 2, ',', '');
		$p_products_array['products_shipping_costs']=number_format( (double)$p_products_array['products_shipping_costs'], 2, ',', '');
		$p_products_array['products_description']=no_html($p_products_array['products_description']);
		return($p_products_array);
	}

	function exportScheme(){
		$t_csv_fields_array=array();
		$t_csv_fields_array['products_id']= 'ART_NUMBER';
		$t_csv_fields_array['products_name']= 'ART_NAME';
		$t_csv_fields_array['products_link']= 'DEEP_LINK';
		$t_csv_fields_array['products_description']= 'LONG_DESCRIPTION';
		$t_csv_fields_array['products_image_1']= 'IMAGE_URL';
		$t_csv_fields_array['products_categories']= 'CATEGORY';
		$t_csv_fields_array['products_price']= 'PRICE';
		$t_csv_fields_array['products_ean']= 'EAN';
		$t_csv_fields_array['products_shippingtime']= 'DELIVERY_TIME';
		$t_csv_fields_array['products_shipping_costs']= 'DELIVERY_COSTS';
		$t_csv_fields_array['retail_price']= 'OLD_PRICE';
		$t_csv_fields_array['products_meta_keywords']= 'KEYWORDS';
		$t_csv_fields_array['products_stock']= 'AVAILABLE_PRODUCTS';
		$t_csv_fields_array['manufacturers_name']= 'BRAND';
		return($t_csv_fields_array);
	}

}
?>